$(document).ready(function () {
    /**
     * 课程详情页
     */
     var course = new Vue({
        el: "#course",
        data: {
            course: []
        },
        created: function () {
            this.getCourse();
        },
        methods: {
            getCourse: function () {
                var that = this;
                axios.get("http://39.108.233.68:8002/course/selOneCourseById?id=" + window.localStorage.getItem("id")).then(
                    function (response) {
                        console.log(response);
                        console.log(response.data.data);
                        console.log(response.data.data.name);
                        console.log(response.data.data.teaName);
                        console.log(response.data.data.detail);
                        console.log(response.data.data.image);
                        if (response.data.data.image === null)
                            response.data.data.image = "img/noPic.jpg";
                        else
                            response.data.data.image = "https://www.luckyone.club/software/lesson/" + response.data.data.image;
                        that.course = response.data.data;
                    }
                )
            }
        }
    })
});